* {
  margin: 0;
  padding: 0;
  --bubble-color: rgb(240, 240, 240);
  --input-color: #fff;
  --my-bubble-color: #72dee4;
}

.wrap {
  position: absolute;
  left: 50%;
  margin-left: -25%;
  margin-top: 20px;
  padding: 50px 0 8px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50vw;
  min-width: 450px;
  height: calc(100vh - 100px);
  min-height: 660px;
  box-shadow: 0 0 8px #ccc;
  border-radius: 5px;
  overflow: hidden;

  .header{
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 40px;
    text-align: center;
    line-height: 40px;
    box-shadow: 0 0 4px #ccc;
  }

  #msg-list {
    width: 100%;
    position: relative;
    height: calc(100vh - 150px);
    overflow-y: auto;

    &::-webkit-scrollbar {
      width: 4px;
      height: 10px;
    }

    &::-webkit-scrollbar-track {
      background: #eee;
      border-radius: 4px;
    }

    &::-webkit-scrollbar-thumb {
      background: #ccc;
      border-radius: 4px;
    }

    .system-notice{
      margin-bottom: 5px;
      text-align: center;
      font-size: 12px;
      
      span{
        display: inline-block;
        padding: 2px 4px;
        background: #eee;
        border-radius: 5px;
      }
    }

    li {
      display: flex;
      align-items: flex-start;
      margin-bottom: 10px;
      list-style: none;

      .avatar {
        min-width: 40px;
        min-height: 40px;
        border-radius: 5px;
        background: #eee;
      }

      .nt {
        margin-left: 10px;
        max-width: calc(100% - 100px);

        .name {
          font-size: 12px;
        }

        .text {
          display: inline-block;
          position: relative;
          min-height: 30px;
          padding: 0 5px;
          line-height: 30px;
          word-wrap: break-word;
          border-radius: 5px;
          background: var(--bubble-color);

          &::before {
            content: '';
            position: absolute;
            left: -11px;
            top: 8px;
            border: 6px solid;
            border-color: transparent var(--bubble-color) transparent transparent;
          }
        }
      }
    }

    .me {
      display: flex;
      justify-content: flex-end;
      padding-right: 4px;

      .avatar {
        order: 2;
      }

      .nt {
        margin-right: 10px;
        text-align: right;

        .name {
          width: 100%;
          text-align: right;
        }

        .text {
          background: var(--my-bubble-color);

          &::before {
            left: auto;
            right: -11px;
            border-color: transparent transparent transparent var(--my-bubble-color);
          }
        }
      }
    }
  }

  .input {
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    width: calc(100% - 16px);
    height: 30px;
    padding: 10px;
    background: var(--input-color);
    box-shadow: 0 0 4px #ccc;

    input {
      flex: 5;
      padding-left: 10px;
    }

    button {
      flex: 1;
      margin-left: 10px;
    }
  }
}
